package com.yang.design_patterns.template_method.version1;

/**
 * @Description: 抽象类
 * @Author: 杨 强
 * @CreateTime: 2022-11-08 10:06
 */
public abstract class AbstractClass {
    /**
     * 模板方法, 设计为final是防止子类重写
     */
    public final void templateMethod(){
        // ....
        method01();

        // ....
        method02();
    }

    protected abstract void method01();

    protected abstract void method02();
}
